#ifndef MY_BACKGROUND_H
#define MY_BACKGROUND_H

#include "../WinDraw/Bitmap.h"
#include "BackgroundElement.h"


const int NUM_TILES = 928;


class Background
{
private:
	const int TILES_PER_BASE,
			  TILES_PER_HEIGHT;
	const int TILE_DIMENSION;// = 16;//px

	Bitmap* tilesImages[BACKGROUND_COUNT];//Sampietro docet
	Bitmap* tilesSpecImages[BACKGROUND_COUNT];
	int hPadding, vPadding;

	int numWall;
	BackgroundElement** mBgElements; 

public:
	Background(void);
	~Background(void);

	void DrawTo(Bitmap* renderTarget, const bool specialActive, const int x = 0, const int y = 0);
	void DrawTo(Bitmap* renderTarget, const int x = 0, const int y = 0);

	const int tilesPerBase()   const {return TILES_PER_BASE;  }
	const int tilesPerHeight() const {return TILES_PER_HEIGHT;}
	const int tileDimension()  const {return TILE_DIMENSION;  }
	const int getHPadding()	   const {return hPadding;		  }
	const int getVPadding()	   const {return vPadding;		  }
	const int getNumWall()	   const {return numWall;	  	  }

	const int getRow(const BackgroundElement* bgTile) const;
	const int getCol(const BackgroundElement* bgTile) const;
	const int getRow(const int			 bgTileIndex) const;
	const int getCol(const int			 bgTileIndex) const;

	const int getIndex(const BackgroundElement* bgTile) const;
	BackgroundElement* getTile(const int tileIndex) const;

};

#endif //MY_BACKGROUND_H